----------------------------------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  /Users/bethanyshockley/Documents/Spring 2020/Research/naturalization/PSRM replication.log
  log type:  text
 opened on:  16 Jan 2023, 23:19:21

. 
end of do-file

. do "/var/folders/_5/9zzyv_4s36z1sz52ylsy92m00000gq/T//SD00521.000000"

. use "/Users/bethanyshockley/Documents/Spring 2020/Research/naturalization/PSRM replication Figures4&5 data.dta
> "

. 
. *Figure 4: Factors determining Acceptance of Immigrants (Standardized)
. 
. graph box factor_tribe factor_arab factor_lang factor_muslim factor_econ factor_resid factor_secur, scheme(s1m
> ono) noout ytitle("Standard Deviations") box(1, fcolor(gray) lcolor(black)) box(2, fcolor(gray) lcolor(black))
>  box(3, fcolor(gray) lcolor(black)) box(4, fcolor(gray) lcolor(black)) box(5, fcolor(gray) lcolor(black)) box(
> 6, fcolor(gray) lcolor(black)) box(7, fcolor(gray) lcolor(black)) medline(lcolor(black)) showyvars yvaroptions
> (label(angle(rvertical))) note("") legend(off)

. graph export figure4.pdf , replace
(file /Users/bethanyshockley/Documents/Spring 2020/Research/naturalization/figure4.pdf written in PDF format)

. 
. **Note that the direction of the yaxis title was reversed using photoshop editing software in order to be cons
> istent with the xaxis labels. 
. 
. * Figure 5: Plot of overall support by social desirability (BIDR)
. 
. svy: ologit overall_q i.gender c.respage##c.respage educall scale
(running ologit on estimation sample)

Survey: Ordered logistic regression

Number of strata   =         3                  Number of obs     =        655
Number of PSUs     =       655                  Population size   = 156,617.78
                                                Design df         =        652
                                                F(   5,    648)   =       4.35
                                                Prob > F          =     0.0007

-------------------------------------------------------------------------------------
                    |             Linearized
      overall_quant |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
--------------------+----------------------------------------------------------------
             gender |
       5.  FEMALE   |  -.4412095   .1803482    -2.45   0.015    -.7953429   -.0870761
            respage |   .0755415   .0392673     1.92   0.055     -.001564    .1526471
                    |
c.respage#c.respage |  -.0008038   .0004596    -1.75   0.081    -.0017063    .0000986
                    |
            educall |  -.0136191   .0517753    -0.26   0.793    -.1152856    .0880473
              scale |   .2552471   .0913753     2.79   0.005     .0758219    .4346724
--------------------+----------------------------------------------------------------
              /cut1 |   .5231776   .8191765                     -1.085365     2.13172
              /cut2 |   1.617795    .820665                      .0063299     3.22926
-------------------------------------------------------------------------------------

. margins, at(scale=(-3(1)3))

Predictive margins                              Number of obs     =        655
Model VCE    : Linearized

1._predict   : Pr(overall_quant==1), predict(pr outcome(1))
2._predict   : Pr(overall_quant==2), predict(pr outcome(2))
3._predict   : Pr(overall_quant==3), predict(pr outcome(3))

1._at        : scale           =          -3

2._at        : scale           =          -2

3._at        : scale           =          -1

4._at        : scale           =           0

5._at        : scale           =           1

6._at        : scale           =           2

7._at        : scale           =           3

------------------------------------------------------------------------------
             |            Delta-method
             |     Margin   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
_predict#_at |
        1 1  |   .5079553   .0659532     7.70   0.000      .378449    .6374615
        1 2  |   .4456454   .0454837     9.80   0.000     .3563332    .5349577
        1 3  |   .3849721   .0283581    13.58   0.000     .3292879    .4406564
        1 4  |   .3276216   .0230782    14.20   0.000     .2823051    .3729381
        1 5  |   .2749228   .0308049     8.92   0.000      .214434    .3354116
        1 6  |   .2277516   .0405723     5.61   0.000     .1480834    .3074197
        1 7  |   .1865188   .0477754     3.90   0.000     .0927066     .280331
        2 1  |   .2435227   .0248821     9.79   0.000      .194664    .2923814
        2 2  |   .2560368   .0217379    11.78   0.000     .2133521    .2987214
        2 3  |   .2617277   .0215842    12.13   0.000     .2193448    .3041106
        2 4  |   .2600029   .0213535    12.18   0.000      .218073    .3019327
        2 5  |   .2510463   .0209683    11.97   0.000     .2098728    .2922198
        2 6  |   .2357807   .0233497    10.10   0.000      .189931    .2816304
        2 7  |   .2156831   .0300407     7.18   0.000     .1566948    .2746713
        3 1  |    .248522   .0511171     4.86   0.000      .148148     .348896
        3 2  |   .2983178   .0400555     7.45   0.000     .2196643    .3769712
        3 3  |   .3533002   .0277888    12.71   0.000     .2987337    .4078666
        3 4  |   .4123755   .0233394    17.67   0.000     .3665461    .4582049
        3 5  |   .4740309    .035228    13.46   0.000     .4048569     .543205
        3 6  |   .5364677   .0538202     9.97   0.000     .4307859    .6421495
        3 7  |   .5977982   .0721341     8.29   0.000      .456155    .7394413
------------------------------------------------------------------------------

. marginsplot, scheme(s1color) plot2opts(lstyle(none) msymbol(none)) ci2opts(lstyle(none))plot1opts(lcolor(gray)
>  mcolor(gray)) ci1opt(lcolor(gray)) plot3opts(lcolor(black) mcolor(black)) ci3opt(lcolor(black)) ylabel(0(.2).
> 8) xtitle("BIDR Impression Management Scale (Social Desirability)") ytitle(Predicted Probability) title("") le
> gend(order(1 "Low Support" 3 "High Support"))

  Variables that uniquely identify margins: scale _outcome

. graph export figure5.pdf , replace
(file /Users/bethanyshockley/Documents/Spring 2020/Research/naturalization/figure5.pdf written in PDF format)

. 
. *Appendix Table A.1
. 
. *income
. svy: tab income2 
(running tabulate on estimation sample)

Number of strata   =         3                  Number of obs     =        620
Number of PSUs     =       620                  Population size   =  149,664.9
                                                Design df         =        617

----------------------
RECODE of |
qinco1    |
(What is  |
the       |
current   |
total     |
monthly   |
income of |
all       |
household |
memb      | proportion
----------+-----------
        1 |      .2415
        2 |      .7585
          | 
    Total |          1
----------------------
  Key:  proportion  =  cell proportion

. *gender
. svy: tab gender 
(running tabulate on estimation sample)

Number of strata   =         3                  Number of obs     =        733
Number of PSUs     =       733                  Population size   =    176,831
                                                Design df         =        730

----------------------
INTERVIEW |
ER: enter |
the       |
gender of |
the       |
responden |
t. Don’ask for |
it        |
          | proportion
----------+-----------
 3.  MALE |      .4887
 5.  FEMA |      .5113
          | 
    Total |          1
----------------------
  Key:  proportion  =  cell proportion

. *age 
. sum respage

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
     respage |        718    40.50696    13.67237         19         94

. *education
. svy: tab educ3
(running tabulate on estimation sample)

Number of strata   =         3                  Number of obs     =        725
Number of PSUs     =       725                  Population size   = 173,654.76
                                                Design df         =        722

----------------------
RECODE of |
educ      |
(What is  |
the       |
highest   |
level of  |
education |
you have  |
completed |
?)        | proportion
----------+-----------
 Less tha |       .142
 Secondar |      .4307
 Any post |      .4273
          | 
    Total |          1
----------------------
  Key:  proportion  =  cell proportion

. *evalfactorsa
. svy: tab evalfactorsa 
(running tabulate on estimation sample)

Number of strata   =         3                  Number of obs     =        728
Number of PSUs     =       728                  Population size   = 176,371.09
                                                Design df         =        725

----------------------
That he   |
is Muslim | proportion
----------+-----------
 4. Not i |      .0298
 3. Not v |      .0769
 2. Somew |      .1904
  1. very |      .7029
          | 
    Total |          1
----------------------
  Key:  proportion  =  cell proportion

. svy: tab evalfactorsb 
(running tabulate on estimation sample)

Number of strata   =         3                  Number of obs     =        728
Number of PSUs     =       728                  Population size   = 176,371.09
                                                Design df         =        725

----------------------
That he   |
is Arab   | proportion
----------+-----------
 4. Not i |      .0511
 3. Not v |      .1616
 2. Somew |      .2973
  1. very |        .49
          | 
    Total |          1
----------------------
  Key:  proportion  =  cell proportion

. svy: tab evalfactorsc 
(running tabulate on estimation sample)

Number of strata   =         3                  Number of obs     =        727
Number of PSUs     =       727                  Population size   =  176,232.6
                                                Design df         =        724

----------------------
That he   |
speaks    |
Arabic    | proportion
----------+-----------
 4. Not i |      .0275
 3. Not v |      .1286
 2. Somew |      .2762
  1. very |      .5676
          | 
    Total |          1
----------------------
  Key:  proportion  =  cell proportion

. svy: tab evalfactorsd 
(running tabulate on estimation sample)

Number of strata   =         3                  Number of obs     =        729
Number of PSUs     =       729                  Population size   = 176,492.93
                                                Design df         =        726

----------------------
That he   |
has spent |
a long    |
time in   |
Qatar     | proportion
----------+-----------
 4. Not i |       .008
 3. Not v |      .0383
 2. Somew |      .2151
  1. very |      .7386
          | 
    Total |          1
----------------------
  Key:  proportion  =  cell proportion

. svy: tab evalfactorse 
(running tabulate on estimation sample)

Number of strata   =         3                  Number of obs     =        724
Number of PSUs     =       724                  Population size   = 175,757.51
                                                Design df         =        721

----------------------
That he   |
has a     |
blood     |
relation  |
to Qatari |
families  |
and       |
tribes    | proportion
----------+-----------
 4. Not i |      .1471
 3. Not v |      .3356
 2. Somew |       .234
  1. very |      .2833
          | 
    Total |          1
----------------------
  Key:  proportion  =  cell proportion

. svy: tab evalfactorsf 
(running tabulate on estimation sample)

Number of strata   =         3                  Number of obs     =        727
Number of PSUs     =       727                  Population size   = 176,247.82
                                                Design df         =        724

----------------------
That he   |
can       |
contribut |
e to      |
Qatar’economic |
developme |
nt        |
          | proportion
----------+-----------
 4. Not i |       .014
 3. Not v |      .0566
 2. Somew |      .1833
  1. very |       .746
          | 
    Total |          1
----------------------
  Key:  proportion  =  cell proportion

. svy: tab evalfactorsg
(running tabulate on estimation sample)

Number of strata   =         3                  Number of obs     =        726
Number of PSUs     =       726                  Population size   = 176,214.77
                                                Design df         =        723

----------------------
That he   |
can       |
contribut |
e to      |
Qatar’security |
and       |
stability |
          | proportion
----------+-----------
 4. Not i |      .0051
 3. Not v |      .0305
 2. Somew |      .1622
  1. very |      .8022
          | 
    Total |          1
----------------------
  Key:  proportion  =  cell proportion

. 
end of do-file

. log close
      name:  <unnamed>
       log:  /Users/bethanyshockley/Documents/Spring 2020/Research/naturalization/PSRM replication.log
  log type:  text
 closed on:  16 Jan 2023, 23:20:06
----------------------------------------------------------------------------------------------------------------
